<template>
	<cl-select-table
		v-model="value"
		:title="t('选择城市')"
		:service="service.order.city"
		:columns="columns"
        :multiple="multiple"
		:dict="{ text: 'cityName',  value: 'id' }"
		pickerType="text"
	/>
</template>

<script setup lang="ts">
defineOptions({
	name: "order-city-select",
});

import { useCool } from "/@/cool";
import { useI18n } from "vue-i18n";
import { CrudProps } from "/#/crud";
import { reactive, ref, useModel } from "vue";

const props = defineProps({
	...CrudProps,
	modelValue: null,
	multiple: Boolean,
});

const { service } = useCool();
const { t } = useI18n();

const value = useModel(props, "modelValue");


const columns = ref([
    { label: t("ID"), prop: "id", minWidth: 140 },
	{ label: t("城市"), prop: "cityName", minWidth: 140 },
]);
</script>
